3.192 \(\int \frac {\cot (x)}{\sec (x)+\tan (x)} \, dx\)

Optimal. Leaf size=9 \[ -x-\tanh ^{-1}(\cos (x)) \]

[Out]

-x-arctanh(cos(x))

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 9, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {4391, 2839, 3770, 8} \[ -x-\tanh ^{-1}(\cos (x)) \]

Antiderivative was successfully verified.

[In]

Int[Cot[x]/(Sec[x] + Tan[x]),x]

[Out]

-x - ArcTanh[Cos[x]]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2839

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4391

Int[(u_.)*((b_.)*sec[(c_.) + (d_.)*(x_)]^(n_.) + (a_.)*tan[(c_.) + (d_.)*(x_)]^(n_.))^(p_), x_Symbol] :> Int[A
ctivateTrig[u]*Sec[c + d*x]^(n*p)*(b + a*Sin[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]

Rubi steps

\begin {align*} \int \frac {\cot (x)}{\sec (x)+\tan (x)} \, dx &=\int \frac {\cos (x) \cot (x)}{1+\sin (x)} \, dx\\ &=-\int 1 \, dx+\int \csc (x) \, dx\\ &=-x-\tanh ^{-1}(\cos (x))\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.02, size = 20, normalized size = 2.22 \[ -x+\log \left (\sin \left (\frac {x}{2}\right )\right )-\log \left (\cos \left (\frac {x}{2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[x]/(Sec[x] + Tan[x]),x]

[Out]

-x - Log[Cos[x/2]] + Log[Sin[x/2]]

________________________________________________________________________________________

fricas [B]  time = 0.68, size = 22, normalized size = 2.44 \[ -x - \frac {1}{2} \, \log \left (\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) + \frac {1}{2} \, \log \left (-\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)/(sec(x)+tan(x)),x, algorithm="fricas")

[Out]

-x - 1/2*log(1/2*cos(x) + 1/2) + 1/2*log(-1/2*cos(x) + 1/2)

________________________________________________________________________________________

giac [A]  time = 3.98, size = 10, normalized size = 1.11 \[ -x + \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)/(sec(x)+tan(x)),x, algorithm="giac")

[Out]

-x + log(abs(tan(1/2*x)))

________________________________________________________________________________________

maple [A]  time = 0.13, size = 10, normalized size = 1.11 \[ \ln \left (\tan \left (\frac {x}{2}\right )\right )-x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)/(sec(x)+tan(x)),x)

[Out]

ln(tan(1/2*x))-x

________________________________________________________________________________________

maxima [B]  time = 0.49, size = 23, normalized size = 2.56 \[ -2 \, \arctan \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right ) + \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)/(sec(x)+tan(x)),x, algorithm="maxima")

[Out]

-2*arctan(sin(x)/(cos(x) + 1)) + log(sin(x)/(cos(x) + 1))

________________________________________________________________________________________

mupad [B]  time = 0.59, size = 23, normalized size = 2.56 \[ 2\,\mathrm {atan}\left (\frac {8}{4\,\mathrm {tan}\left (\frac {x}{2}\right )+4}-1\right )+\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(x)/(tan(x) + 1/cos(x)),x)

[Out]

2*atan(8/(4*tan(x/2) + 4) - 1) + log(tan(x/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cot {\relax (x )}}{\tan {\relax (x )} + \sec {\relax (x )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(x)/(sec(x)+tan(x)),x)

[Out]

Integral(cot(x)/(tan(x) + sec(x)), x)

________________________________________________________________________________________